package com.song.springcloud.servcie;

import com.song.springcloud.dao.UserDao;
import com.song.springcloud.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServcieImpl implements UserService{

    @Autowired
    private UserDao userDao;

    @Override
    public boolean addUser(User user) {
        return userDao.addUser(user);
    }

    @Override
    public User queryUserById(long userId) {
        return userDao.queryUserById(userId);
    }

    @Override
    public List<User> queryAll() {
        System.out.println("进入了service!!!");
        return userDao.queryAll();
    }
}
